package com.idealighter.game.core.dao.generate.mapper;

import com.idealighter.game.core.dao.generate.domain.PlayerMainDomain;
import com.idealighter.game.core.dao.generate.domain.PlayerMainDomainExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface PlayerMainDomainMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=PlayerMainDomainSqlProvider.class, method="countByExample")
    long countByExample(PlayerMainDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @DeleteProvider(type=PlayerMainDomainSqlProvider.class, method="deleteByExample")
    int deleteByExample(PlayerMainDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Delete({
        "delete from player_main",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Insert({
        "insert into player_main (super_id, phone, ",
        "union_id, user_name, ",
        "email, player_name, ",
        "password, re_login_code, ",
        "recommend_id, register_type, ",
        "tourist, type, online, ",
        "icon, exp, level, ",
        "ingot, gold, safe_gold, ",
        "win_gold, cedit, lottery, ",
        "transfer_reward, bank_pwd, ",
        "vip_level, vip_end_time, ",
        "locked, channel_id)",
        "values (#{superId,jdbcType=BIGINT}, #{phone,jdbcType=VARCHAR}, ",
        "#{unionId,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, ",
        "#{email,jdbcType=VARCHAR}, #{playerName,jdbcType=VARCHAR}, ",
        "#{password,jdbcType=VARCHAR}, #{reLoginCode,jdbcType=VARCHAR}, ",
        "#{recommendId,jdbcType=BIGINT}, #{registerType,jdbcType=TINYINT}, ",
        "#{tourist,jdbcType=BIT}, #{type,jdbcType=TINYINT}, #{online,jdbcType=BIT}, ",
        "#{icon,jdbcType=INTEGER}, #{exp,jdbcType=BIGINT}, #{level,jdbcType=INTEGER}, ",
        "#{ingot,jdbcType=BIGINT}, #{gold,jdbcType=BIGINT}, #{safeGold,jdbcType=BIGINT}, ",
        "#{winGold,jdbcType=BIGINT}, #{cedit,jdbcType=BIGINT}, #{lottery,jdbcType=BIGINT}, ",
        "#{transferReward,jdbcType=BIGINT}, #{bankPwd,jdbcType=VARCHAR}, ",
        "#{vipLevel,jdbcType=INTEGER}, #{vipEndTime,jdbcType=TIMESTAMP}, ",
        "#{locked,jdbcType=BIT}, #{channelId,jdbcType=VARCHAR})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Long.class)
    int insert(PlayerMainDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @InsertProvider(type=PlayerMainDomainSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Long.class)
    int insertSelective(PlayerMainDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=PlayerMainDomainSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="super_id", property="superId", jdbcType=JdbcType.BIGINT),
        @Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR),
        @Result(column="union_id", property="unionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
        @Result(column="player_name", property="playerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR),
        @Result(column="re_login_code", property="reLoginCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="recommend_id", property="recommendId", jdbcType=JdbcType.BIGINT),
        @Result(column="register_type", property="registerType", jdbcType=JdbcType.TINYINT),
        @Result(column="tourist", property="tourist", jdbcType=JdbcType.BIT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="online", property="online", jdbcType=JdbcType.BIT),
        @Result(column="icon", property="icon", jdbcType=JdbcType.INTEGER),
        @Result(column="exp", property="exp", jdbcType=JdbcType.BIGINT),
        @Result(column="level", property="level", jdbcType=JdbcType.INTEGER),
        @Result(column="ingot", property="ingot", jdbcType=JdbcType.BIGINT),
        @Result(column="gold", property="gold", jdbcType=JdbcType.BIGINT),
        @Result(column="safe_gold", property="safeGold", jdbcType=JdbcType.BIGINT),
        @Result(column="win_gold", property="winGold", jdbcType=JdbcType.BIGINT),
        @Result(column="cedit", property="cedit", jdbcType=JdbcType.BIGINT),
        @Result(column="lottery", property="lottery", jdbcType=JdbcType.BIGINT),
        @Result(column="transfer_reward", property="transferReward", jdbcType=JdbcType.BIGINT),
        @Result(column="bank_pwd", property="bankPwd", jdbcType=JdbcType.VARCHAR),
        @Result(column="vip_level", property="vipLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="vip_end_time", property="vipEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="locked", property="locked", jdbcType=JdbcType.BIT),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR)
    })
    List<PlayerMainDomain> selectByExample(PlayerMainDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Select({
        "select",
        "id, super_id, phone, union_id, user_name, email, player_name, password, re_login_code, ",
        "recommend_id, register_type, tourist, type, online, icon, exp, level, ingot, ",
        "gold, safe_gold, win_gold, cedit, lottery, transfer_reward, bank_pwd, vip_level, ",
        "vip_end_time, locked, channel_id",
        "from player_main",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="super_id", property="superId", jdbcType=JdbcType.BIGINT),
        @Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR),
        @Result(column="union_id", property="unionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
        @Result(column="player_name", property="playerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR),
        @Result(column="re_login_code", property="reLoginCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="recommend_id", property="recommendId", jdbcType=JdbcType.BIGINT),
        @Result(column="register_type", property="registerType", jdbcType=JdbcType.TINYINT),
        @Result(column="tourist", property="tourist", jdbcType=JdbcType.BIT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="online", property="online", jdbcType=JdbcType.BIT),
        @Result(column="icon", property="icon", jdbcType=JdbcType.INTEGER),
        @Result(column="exp", property="exp", jdbcType=JdbcType.BIGINT),
        @Result(column="level", property="level", jdbcType=JdbcType.INTEGER),
        @Result(column="ingot", property="ingot", jdbcType=JdbcType.BIGINT),
        @Result(column="gold", property="gold", jdbcType=JdbcType.BIGINT),
        @Result(column="safe_gold", property="safeGold", jdbcType=JdbcType.BIGINT),
        @Result(column="win_gold", property="winGold", jdbcType=JdbcType.BIGINT),
        @Result(column="cedit", property="cedit", jdbcType=JdbcType.BIGINT),
        @Result(column="lottery", property="lottery", jdbcType=JdbcType.BIGINT),
        @Result(column="transfer_reward", property="transferReward", jdbcType=JdbcType.BIGINT),
        @Result(column="bank_pwd", property="bankPwd", jdbcType=JdbcType.VARCHAR),
        @Result(column="vip_level", property="vipLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="vip_end_time", property="vipEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="locked", property="locked", jdbcType=JdbcType.BIT),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR)
    })
    PlayerMainDomain selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerMainDomainSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") PlayerMainDomain record, @Param("example") PlayerMainDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerMainDomainSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") PlayerMainDomain record, @Param("example") PlayerMainDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerMainDomainSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(PlayerMainDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_main
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Update({
        "update player_main",
        "set super_id = #{superId,jdbcType=BIGINT},",
          "phone = #{phone,jdbcType=VARCHAR},",
          "union_id = #{unionId,jdbcType=VARCHAR},",
          "user_name = #{userName,jdbcType=VARCHAR},",
          "email = #{email,jdbcType=VARCHAR},",
          "player_name = #{playerName,jdbcType=VARCHAR},",
          "password = #{password,jdbcType=VARCHAR},",
          "re_login_code = #{reLoginCode,jdbcType=VARCHAR},",
          "recommend_id = #{recommendId,jdbcType=BIGINT},",
          "register_type = #{registerType,jdbcType=TINYINT},",
          "tourist = #{tourist,jdbcType=BIT},",
          "type = #{type,jdbcType=TINYINT},",
          "online = #{online,jdbcType=BIT},",
          "icon = #{icon,jdbcType=INTEGER},",
          "exp = #{exp,jdbcType=BIGINT},",
          "level = #{level,jdbcType=INTEGER},",
          "ingot = #{ingot,jdbcType=BIGINT},",
          "gold = #{gold,jdbcType=BIGINT},",
          "safe_gold = #{safeGold,jdbcType=BIGINT},",
          "win_gold = #{winGold,jdbcType=BIGINT},",
          "cedit = #{cedit,jdbcType=BIGINT},",
          "lottery = #{lottery,jdbcType=BIGINT},",
          "transfer_reward = #{transferReward,jdbcType=BIGINT},",
          "bank_pwd = #{bankPwd,jdbcType=VARCHAR},",
          "vip_level = #{vipLevel,jdbcType=INTEGER},",
          "vip_end_time = #{vipEndTime,jdbcType=TIMESTAMP},",
          "locked = #{locked,jdbcType=BIT},",
          "channel_id = #{channelId,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(PlayerMainDomain record);
}